Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

178
Visualizações
Why do I get this warning and how to fix it "Functions are not valid as a React child..."

Full warning:

Functions are not valid as a React child. This may happen if you return a Component instead of <Component /> from render. Or maybe you meant to call this function rather than return it.

I'm making a simple Quiz App, and in this component I'm rendering TouchableOpacities that on click will navigate you to Test screen

 return (
        <View style={styles.container}>
          {
          isLoading ? 
            (<View style={{display:'flex',flex:1,justifyContent:'center',alignItems:'center'}}>
              <ActivityIndicator size="large" color="#0000ff"/>
            </View>):
            (
              <ScrollView>
                  {data.map(test =>(
                    <HomeTestComponent key={test.id} navig={navigation} name={test.name} tags={test.tags} description={test.description}/>
                  ))}

                  <Footer navig={navigation}/>
              </ScrollView>
            
            )
          }
        </View>
     );
about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

Somewhere you are returning a function in a render function

It'll look something like this:

const func = () => {}

return (
 () => {}
)

return (
  function() {}
)

return ( func )
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda